<c:set var='view' value='/cart' scope='session' />
<!-- BEGIN CONTEINER -->
  <div id="main">
    <div id="title">
      <div class="left"> <fmt:message key='mycart'/></div>
      <div class="sp"></div>
    </div>
    <div id="table">
      <div class="head">
        <ul>
          <li class="preview"><fmt:message key='imageC'/></li>
          <li class="title"><fmt:message key='nameC'/></li>
          <li class="price"><fmt:message key='priceC'/></li>
          <li class="price"><fmt:message key='remiseC'/></li>
          <li class="price"><fmt:message key='pricerC'/></li>
          <li class="quantity"><fmt:message key='quantityC'/></li>
          <li class="total"><fmt:message key='totalC'/></li>
        </ul>
        <div class="sp"></div>
      </div>
      <div class="rows sp">
       <c:if test="${usercart.numberOfItems ne 0}">
       <c:forEach var="item" items="${usercart.items}" varStatus="iter">
       ${(((iter.index) % 2) == 0) ? '<div class="row">' : '<div class="row li2">'}   
          <ul>
            <li class="preview"> <a HREF="<c:url value='/product?${item.product.idproduit}'/>"><img SRC="${initParam.productImagePath}${item.product.image}" height="55" border="0" alt="${item.name}"/></a> </li>
            <li class="title"><a href="<c:url value='/product?${item.product.idproduit}'/>">${item.name}</a></li>
            <li class="price">${item.product.prix}&euro;</li>
            <li class="price">${item.product.remise}</li>
            <li class="price"><fmt:formatNumber value="${item.product.prix*(100-item.product.remise)/100}" pattern="0.00"/>&euro;</li>
            <li class="quantity">
              <div class="top">${item.quantity}</div>
              <div class="bottom"> <a class="less" href="<c:url value='/addcart?u=-1&id=${item.product.idproduit}'/>"></a> <a class="plus" href="<c:url value='/addcart?u=1&id=${item.product.idproduit}'/>"></a> </div>
            </li>
            <li class="total">${item.totalremise}&euro;</li>
            <li class="admin"><a href="<c:url value='/addcart?u=0&id=${item.product.idproduit}'/>">X</a></li>
          </ul>
          <div class="sp"></div>
        </div>
        </c:forEach>  
       </c:if>
      <c:if test="${usercart.numberOfItems == 0}">
          <div class="row" align="center">
          <fmt:message key='noitemsoncart'/>
          </div>
      </c:if>
      </div>
    </div>
    <div id="total"> <span class="value">${usercart.totalremise}&euro;</span><span class="label"><fmt:message key='total'/></span></div>
    <div class="sp"></div>
    <div id="buttons">
        <c:if test="${usercart.numberOfItems ne 0}">
            <a href="<c:url value='/summary'/>" id="checkout"><fmt:message key='checkout'/></a>
        </c:if>
        <a href="<c:url value='/'/>" class="button"><fmt:message key='continue'/></a>
    </div>
  </div>
</div>
<!-- END CONTENT -->